{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "70a62506",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "68\n",
      "P\n"
     ]
    }
   ],
   "source": [
    "#题目一\n",
    "#（1）字符\n",
    "import string\n",
    "letters = string.ascii_uppercase\n",
    "m = int(input())\n",
    "n = m % len(letters) \n",
    "print(letters[n-1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "810c35d1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "F\n",
      "[6, 32, 58, 84]\n"
     ]
    }
   ],
   "source": [
    "#(1)码值\n",
    "import string\n",
    "letters = string.ascii_uppercase\n",
    "m = input()\n",
    "n = letters.index(m)+1\n",
    "List = []\n",
    "for i in range(10):\n",
    "    List.append(n)\n",
    "    n += len(letters)\n",
    "    if n > 100:\n",
    "        break\n",
    "print(List)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "0311d002",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H']\n",
      "['I', 'J', 'K', 'L', 'M', 'N', 'O', 'P']\n",
      "['Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X']\n",
      "['Y', 'Z']\n"
     ]
    }
   ],
   "source": [
    "#(2)码表\n",
    "import string\n",
    "letters = string.ascii_uppercase\n",
    "List = []\n",
    "for j in letters:\n",
    "    List.append(j)\n",
    "    m = 0\n",
    "    n = 8\n",
    "for i in range(10):\n",
    "    print(List[m:n])\n",
    "    m += 8\n",
    "    n += 8\n",
    "    if m >= len(letters):\n",
    "        break"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "6b336e0d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1*1=1  \n",
      "1*2=2  2*2=4  \n",
      "1*3=3  2*3=6  3*3=9  \n",
      "1*4=4  2*4=8  3*4=12 4*4=16 \n",
      "1*5=5  2*5=10 3*5=15 4*5=20 5*5=25 \n",
      "1*6=6  2*6=12 3*6=18 4*6=24 5*6=30 6*6=36 \n",
      "1*7=7  2*7=14 3*7=21 4*7=28 5*7=35 6*7=42 7*7=49 \n",
      "1*8=8  2*8=16 3*8=24 4*8=32 5*8=40 6*8=48 7*8=56 8*8=64 \n",
      "1*9=9  2*9=18 3*9=27 4*9=36 5*9=45 6*9=54 7*9=63 8*9=72 9*9=81 \n"
     ]
    }
   ],
   "source": [
    "#题目二\n",
    "for i in range(1,10):\n",
    "    for j in range(1,i+1):\n",
    "        print(f'{j}*{i}={i*j:<2}',end = ' ')\n",
    "    print()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "id": "d9b7c215",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Read as much as you can in English. No matter what it is, from cartoons to British literature anything counts.\n",
      "包含，那些单词为：\n",
      "no\n"
     ]
    }
   ],
   "source": [
    "#题目三Read as much as you can in English. No matter what it is, from cartoons to British literature anything counts.\n",
    "import string\n",
    "lowercase = string.ascii_lowercase\n",
    "uppercase = string.ascii_uppercase\n",
    "List = ['how','are','good','new','benefit','no']\n",
    "list1 = input()\n",
    "list1 = list1.split()\n",
    "list2 = []\n",
    "for i in list1:\n",
    "    i = i.strip()\n",
    "    letter = ''\n",
    "    for j in i:\n",
    "        if j in uppercase:\n",
    "            letter += lowercase[uppercase.index(j)]\n",
    "        else:\n",
    "            if j in lowercase:\n",
    "                letter += j\n",
    "    if letter in List:\n",
    "        list2.append(letter)\n",
    "if list2:\n",
    "    print('包含，那些单词为：')\n",
    "    for i in list2:\n",
    "        print(i)   \n",
    "else:\n",
    "    print('不包含')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fa249938",
   "metadata": {},
   "outputs": [],
   "source": [
    "#题目四  不会"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fc28478f",
   "metadata": {},
   "outputs": [],
   "source": [
    "#题目五 不会"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
